package com.sun.entity.users;

import com.sun.entity.BaseEntity;
import jakarta.persistence.Entity;

import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;

/**
 * MP自动填充Handler
 *
 * @Author sun
 * @CreateTime 2025/9/2 02:13
 */

@Data
@Table(name = "role_menus")
@Entity
@SQLDelete(sql = "update role_menus set deleted = 1 where id = ?")
@IdClass(RoleMenuEntityPK.class)
public class RoleMenu extends BaseEntity  {
    @Id
    private long roleId; // 角色id
    @Id
    private long menuId; // 菜单id
}
